<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.3"></script>
<section class="good-pro-cate">
<div style="width:100%;height:600px;border:1px solid gray" class="bd show-area" id="container"></div>
</section>
<script type="text/javascript">
	//var map = new BMap.Map("container",{mapType: BMAP_HYBRID_MAP});//卫星地图
	var map = new BMap.Map("container");//普通地图
	map.centerAndZoom(new BMap.Point(116.404, 39.915), 15);
	map.addControl(new BMap.NavigationControl());//添加缩放控件

	//根据IP定位到本地地图
	function myFun(result){
		var cityName = result.name;
		map.setCenter(cityName);
	}
		var myCity = new BMap.LocalCity();
		myCity.get(myFun);
	
		var myGeo = new BMap.Geocoder();
		var address = "";
	<#if organizationLists?exists>
		<#list organizationLists as organizationList>
			// 将地址解析结果显示在地图上
			address = "${organizationList.city} + ${organizationList.county} + ${organizationList.address}";
			myGeo.getPoint(address, function(point){
				if (point) {
					var marker = new BMap.Marker(point);
		
					var opts = {
						width : 200,     // 信息窗口宽度
						height: 100,     // 信息窗口高度
						title : "${organizationList.name}"//窗口标题
					}
		
					var sContent = "${organizationList.description}";//窗口内容
		
					var infoWindow = new BMap.InfoWindow(sContent, opts);  // 创建信息窗口对象
		
					marker.addEventListener("onclick", function(){          
						this.openInfoWindow(infoWindow);  
					});
		
					map.addOverlay(marker);
				}
			}, "${organizationList.province}");
		</#list>
	</#if>
</script>